<?php

/**
 * Authentication Exceptions
 *
 * Throws the exceptions from the authentification
 * @author Agustin
 * @version 1.0
 * @package CMS/Auth
 */
class CMS_Auth_Exception extends CMS_Exception
{
    /**#@+
     * Login exception types
     */
    const ACCOUNT_NOT_FOUND = 1;
    const SITE_NOT_FOUND = 2;
    const WRONG_PASS = 3;
    const UKNOWN = 4;
    const ACCOUNT_DISABLED = 5;
    const SITE_BLOCKED = 6;
    const CREDENTIAL_EXPIRED = 7;
    /**#@-*/

    /**
     * Exception constructor
     * 
     * @param string $message
     * @param integer $code
     * @param int $logLevel, one of the Zend_Log constants. If set, the exception will be logged
     * @param $previous
     */
    public function __construct($message, $code = 0, $logLevel = null, Exception $previous = null)
    {
        parent::__construct($message, $code, $logLevel, $previous);
    }

    // custom string representation of object
    public function __toString()
    {
        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
    }

}
?>